package com.yikome.shop.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.yikome.common.CommonRepository;
import com.yikome.shop.entity.Present;

@Repository
public interface PresentRepository extends CommonRepository<Present, Long> {

	@Query("select t from Present t where t.yn = 1")
	List<Present> findAllPresent();

	@Query("select t from Present t where t.yn = 1 and t.id = :presentId")
	Present findPresent(@Param("presentId") Long presentId);

}
